import java.awt.Color;
import java.awt.Dimension;
import java.awt.Graphics;
import java.awt.image.BufferedImage;

import java.io.File;
import java.io.IOException;


import javax.imageio.ImageIO;
import javax.swing.JPanel;

public class MyPanel extends JPanel{
	private BufferedImage image;
	public MyPanel(){
			//System.out.println("Panel");
		 try {                
	          image = ImageIO.read(new File("x_thumb.jpg"));
	       } catch (IOException ex) {
	           System.out.println("Nem megy");
	       }
		setLayout(null);
		
		//setPreferredSize(new Dimension(600,400));
		
	}
		
	
	public void paintComponent(Graphics g){

		   // Draw our Image object.
		int h=image.getHeight();
		int w=image.getWidth();
		   g.drawImage(image,200,90,w,h, this); // at location 50,10
		     // 200 wide and high
		  }

	
}